import { createApp } from 'vue'
import App from './App.vue'
import "./assets/iconfont/iconfont.css"
import store from './store'
import CommonLayout from '@/layout/index.vue'
import router from './router';
import vant from 'vant'
import 'vant/lib/index.css';
import "./assets/reset.less";
import "./assets/common.less";

const app = createApp(App)

app.config.globalProperties.$filters = {
    imgUrlFormat(value: string): string {
        if(value && value.startsWith('http')) {
            return value
        }else {
            return window.location.protocol + '//' + window.location.host + ':7001' + value
        }
    }
}

app.component('common-layout',CommonLayout)
app.use(router).use(store).use(vant).mount('#app')
